package com.bolt.auth.security.common.annotation;

import com.bolt.auth.security.common.config.BoltResourceServerConfigurer;
import com.bolt.auth.security.common.config.SecurityHandlerConfig;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import org.springframework.security.oauth2.provider.token.TokenStore;

import java.lang.annotation.*;

/**
 * 资源服务注解
 */
@Documented
@Inherited
@EnableResourceServer
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@AutoConfigureAfter(TokenStore.class)
@EnableGlobalMethodSecurity(prePostEnabled = true)
@Import({SecurityHandlerConfig.class,BoltResourceServerConfigurer.class})
public @interface EnableClientResourceServer {
}
